export default async function getAllGood(token, filter, chanOptions, pagetoken, ) {
	try {
		const url =
			`https://open.feishu.cn/open-apis/bitable/v1/apps/${chanOptions.chanToken}/tables/${chanOptions.chanTableID}/records/search?page_size=100&page_token=${pagetoken}&user_id_type=user_id`;
		var data = {}
		if (filter) {
			data = {
				automatic_fields: false,
				field_names: [

				],
				filter: filter

			}
		} else {
			data = {
				automatic_fields: false,
				field_names: [
					// 可以添加更多的字段名称，如 '商品ID', '商品名称', '货主名称', '是否排期', '总销量', '总库存', '销售单位条码'
				],
			}
		};


		const response = await uni.request({
			url,
			method: "POST",
			header: {
				Authorization: `Bearer ${token}`,
				"Content-Type": "application/json"
			},
			data: JSON.stringify(data)
		});
		return response

	} catch (e) {
		console.log("获取商品数据错误" + e)
	}
}